package com.tenbent.product.base.web;

import com.tenbent.product.base.query.page.PageResult;

/**
 * 前台json page对象
 *
 * Created by ThinkPad on 2017/8/3.
 */
public class Page<T> {

	public Page(PageResult result) {
		this.totalNum = result.getTotal();
		this.pageSize = result.getPageSize();
		this.totalPages = result.getTotalPages();
		this.pageNum = result.getPageNumber();
		this.pageResult = result;
	}

	private Long totalNum; // 总记录数

	private Integer pageSize; // 每页多少条记录

	private Integer totalPages; // 总页数

	private Integer pageNum; // 当前第几页

	private PageResult<T> pageResult; // 当前页记录对象

	public Long getTotalNum() {
		return totalNum;
	}

	public void setTotalNum(Long totalNum) {
		this.totalNum = totalNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(Integer totalPages) {
		this.totalPages = totalPages;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public PageResult getPageResult() {
		return pageResult;
	}

	public void setPageResult(PageResult pageResult) {
		this.pageResult = pageResult;
	}
}
